package com.miniso.robot;

import com.miniso.robot.bean.HelloDynamic;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;

import javax.management.MBeanServer;
import javax.management.ObjectName;
import java.lang.management.ManagementFactory;

@EnableAsync
@EnableFeignClients
@SpringBootApplication
public class RobotApplication {

    public static void main(String[] args) throws Exception {
        SpringApplication.run(RobotApplication.class, args);
        MBeanServer platformMBeanServer = ManagementFactory.getPlatformMBeanServer();
        System.out.println("111234234234234234s");
        platformMBeanServer.registerMBean( new HelloDynamic(),new ObjectName("jmxBean:name=hello"));
    }
}
